package com.tk.exam.dao;

import com.github.pagehelper.PageInfo;
import com.tk.exam.domain.TkFile;
import com.tk.exam.domain.TkFileExample;
import com.tk.exam.mapper.TkExamPaperExtMapper;
import com.tk.exam.mapper.TkFileMapper;
import com.tk.exam.service.TkFileService;
import com.tk.exam.vo.paper.SearchPaperListResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class TkFileDao {
    @Autowired
    private TkFileMapper tkFileMapper;
    public PageInfo<TkFile> getOfflinePaperByExamIdWithPage(int examId){
        TkFileExample example=new TkFileExample();
        example.or().andEntityIdEqualTo(examId).andEntityTypeEqualTo(TkFileService.TYPE_OFF_LINE);
        return new PageInfo<TkFile>(tkFileMapper.selectByExample(example));
    }
}
